package ch03.d6;

import org.junit.Test;

public class StudentTest {
    @Test
    public void testNew(){
        Student s=new Student();
        s.setName("张三");
        s.setAge(10);

        Student s2=new Student();
        s2.setName("张三");
        s2.setAge(10);

        System.out.println(s);
        System.out.println(s2);
        //==比较的是地址
        System.out.println(s==s2);
        System.out.println(s.equals(s2));

    }
}
